import request from '@/utils/request'

// 获取商机列表数据
export function getbusinessList (data) {
    return request({
        url: '/business/list',
        method:'post',
        data
    })
}

// 新建商机
export function addbusinessList (data) {
    return request({
        url: '/business/save',
        method:'post',
        data
    })
}

// 查看商机
export function viewBusiness (id) {
    return request({
        url: `/business/${id}`,
    })
}

// 分配商机
export function allocationBusinessList (data) {
    return request({
        url: '/business/allocation',
        method:'post',
        data
    })
}

// 获取商机状态
export function getBusinessStatus () {
    return request({
        url: `/dictionary/query/${21}`,
    })
}

// 获取所有部门
export function getDepartment () {
    return request({
        url: `/dictionary/dept`,
    })
}

// 获取公海池列表
export function getHighseasList (data) {
    return request({
        url: '/business/list',
        method:'post',
        data
    })
}

// 捞取商机


// 客户跟进详情
export function getFollowUp(data) {
    return request({
        url: `/business/follow`,
        method:'post',
        data
    })
}

// 获取渠道来源
export function getChannel() {
    return request({
        url: `/dictionary/query/${16}`,
    })
}

// 获取客户地区
export function getArea() {
    return request({
        url: `/dictionary/query/${13}`,
    })
}

// 获取意向学科
export function getDiscipline() {
    return request({
        url: `/dictionary/query/${2}`,
    })
}

// 获取职业
export function getCareer() {
    return request({
        url: `/dictionary/query/${6}`,
    })
}

// 获取学历
export function getEducation() {
    return request({
        url: `/dictionary/query/${7}`,
    })
}

// 获取专业
export function getSpeciality() {
    return request({
        url: `/dictionary/query/${8}`,
    })
}

// 获取在职状态
export function getJobStatus() {
    return request({
        url: `/dictionary/query/${9}`,
    })
}

// 获取薪资
export function getSalary() {
    return request({
        url: `/dictionary/query/${10}`,
    })
}

// 获取沟通重点
export function getCommunicate() {
    return request({
        url: `/dictionary/query/${5}`,
    })
}

// 获取跟进状态
export function getTrackStatus() {
    return request({
        url: `/dictionary/query/${11}`,
    })
}

// 获取课程列表
export function getCourseList() {
    return request({
        url: `/dictionary/query/${19}`,
    })
}

// 保存跟进
export function updateFollow(data) {
    return request({
        url: `/business/updateFollow`,
        method:'put',
        data
    })
}

// 退回公海
export function returnHighseas(data) {
    return request({
        url: `/business/return`,
        method:'put',
        data
    })
}

// 获取踢回公海原因
export function getReturnReason() {
    return request({
        url: `/dictionary/query/${12}`,
    })
}

// 商机捞取
export function fishForBusiness (data) {
    return request({
        url: '/business/pull',
        method:'post',
        data
    })
}

// 通过岗位查询下方人员姓名
export function getPersonnel (params) {
    console.log(params);
    return request({
        url: '/dictionary/getUserBydeptName',
        params:{deptName:params}
    })
}